function LotteryGridItem(props) {
    let Element;
    if (props.data.type === "prize") {
        Element = (
            <div className={`turntable-item item ${props.chosen?"chosen":""}`}>
                <div className="image">
                    <img src={props.data.image} alt="" />
                </div>
                <div className="text">
                    {props.data.text}
                </div>
            </div>
        )
    }
    else if (props.data.type === "button") {
        Element = (
            <div className="turntable-item item lottory-button" onClick={props.data.click}>
                <div className="lottery-text">
                    {props.data.buttonText}
                </div>
                <div className="text">
                    {props.data.text}
                </div>
            </div>
        )
    } else if (props.data.type === "locked") {
        Element = (
            <div className="turntable-item item">
                <div className="locked"></div>
                <div className="image">
                    <img src={props.data.image} alt="" />
                </div>
                <div className="text">
                    {props.data.text}
                </div>
                <i className="iconfont icon-LOCKCLOSED"></i>
            </div>
        )
    }
    return Element;
}
export default LotteryGridItem;